package main

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func main() {
	// 1. 创建路由
	router := gin.Default()
	// 2. 绑定路由规则，执行的函数
	// gin.context分装了request和response
	router.GET("/", func(c *gin.Context) {
		c.String(http.StatusOK, "Hello world!")
	})
	// 监听端口，默认在9090
	// Run("缺省8080“)
	router.Run(":9091")

}
